<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.sibco.client.common.UrlMap" %>
<%@ page import="com.sibco.client.system.User" %>
<%@ page import="java.util.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="com.bstek.dorado.utils.variant.VariantSet" %>
<%@ page errorPage="/dorado/exception.d" %>
<%@ taglib uri="http://www.bstek.com/dorado" prefix="d" %>
<html>
<head>
<title>SIBCO 客户端</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

a:link { text-decoration: none;} 
a:active { text-decoration: none; } 
a:visited { text-decoration: none; } 

.style1 {color: #ffffff;}
.style2 {color: #000000;}
-->
</style>

</head>
<body style="margin: 0; overflow: hidden">
 <%
User user=(User)session.getAttribute("User");
String ContextPath=request.getContextPath();
  String nextPage=UrlMap.mapJspUrl("logout.jsp")+"?flag=1";
  String homeStr="",logoutStr="",contactServiceMan="";
  String i18n=user.getCountry();
  GregorianCalendar dt=new GregorianCalendar();
  int iYear = dt.get(Calendar.YEAR);
  int iHour=dt.get(Calendar.HOUR_OF_DAY);
  int iMonth = dt.get(Calendar.MONTH)+1;
  int iDay = dt.get(Calendar.DAY_OF_MONTH);
  int iDayOfWeek=dt.get(Calendar.DAY_OF_WEEK);
  String theWeek="";
  //System.out.println("*****"+iDayOfWeek);
  String[] weekCn=new String[]{"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
  String[] weekEn=new String[]{"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
  
  String sYear = ""+iYear;
  String sMonth = iMonth+"";
  String sDay = iDay+"";
  String welcomeString="";
  if (i18n.equals("cn")){
     homeStr="返回首页";
     contactServiceMan="联系客服";
     logoutStr="退出";
     welcomeString+="欢迎您！";
  }
  if (i18n.equals("en")){
     homeStr="HOME";
     contactServiceMan="Contact Service Man";
     logoutStr="Logout";
     welcomeString+="Welcome！";
  }
  welcomeString+=user.getRealName()+" "; 
  if (i18n.equals("cn")){
     welcomeString+=sYear+"-"+sMonth+"-"+sDay+" "+weekCn[iDayOfWeek-1];
  }
  if (i18n.equals("en")){
     welcomeString+=sMonth+"/"+sDay+"/"+sYear+" "+weekEn[iDayOfWeek-1];
  }
  welcomeString+="  ";
%>
 <d:View config="com.sibco.client.main">
 <d:Layout type="border" padding="0">
	<d:Pane position="top">
         <table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" background="<%=UrlMap.mapImageUrl("bannar.gif")%>">
	    <tr>
		<td width="30%" valign="bottom"><img src="<%=UrlMap.mapImageUrl("logo_ss.jpg")%>">
		</td>
		<td><div align="right"><img src="<%=UrlMap.mapImageUrl("dot.gif")%>" width="10" height="10">
		  <a href="<%=UrlMap.mapJspUrl("welcome.jsp")%>" class="style1" target="main" onclick="setHomeTitle()"><%=homeStr%></a></div>
		</td>		
		<td width="420" valign="middle" >
		  <div align="right" class="style1" > 
                      <div align="right">
                      　　<a href="#" class="style1"><%=welcomeString%></a></span>&nbsp;
                         <!--<a href="#" class="style1" onclick="contactServiceMan()"><font color="#FFFF00"><%=contactServiceMan%></font></a>--></span>&nbsp;
                      　　<a href="<%=nextPage%>" class="style1">[<%=logoutStr%>]</a>
                      　　<!--<a class="style2" style="style1" href="<%=UrlMap.mapLoginServletUrl()%>?Language=ZH">中文</a>&nbsp;&nbsp;
                      　　<a class="style2" href="<%=UrlMap.mapLoginServletUrl()%>?Language=US">English</a>-->
                      </div>
                  </div>
                </td>
                <td valign="bottom">&nbsp;
                </td>
            </tr>
	 </table>
	 <d:MenuBar id="functionMenubar"/>
	</d:Pane>	
        <d:Pane position="center" valign="top">
          <d:SplitPanel id="spiltpanel1" orientation="horizontal" position="160" width="100%" height="100%" padding="0">
          <!--<d:SplitPanel id="spiltpanel2" orientation="vertical" position="75%" width="100%" height="100%" padding="0">-->
             <!--<iframe id="frameToolsBar" src="jsp/toolsBar.jsp" name="toolsBar" frameborder="0" style="width: 100%; height: 100%" onload="hideCovering()"></iframe>-->
              <!--<d:Splitter />              
              <d:SubWindow id="windowDescription" title="Help Document" width="100%" height="100%" showMinimizeButton="false" showMaximizeButton="true" draggable="false" resizable="false">
                <iframe name="description" frameborder="0" style="width: 100%; height: 100%"></iframe>
              </d:SubWindow>-->
          <!--</d:SplitPanel>-->
          <!--<d:Splitter />-->      
            <d:SubWindow id="windowMain" title="Home" width="100%" height="100%" showMinimizeButton="false" showMaximizeButton="true" draggable="true" resizable="true">
              <div style="width: 100%; height: 100%; position: relative">
                <iframe id="frameMain" name="main" frameborder="0" style="width: 100%; height: 100%" src="jsp/welcome.jsp"></iframe>
                <div id="frameCovering" style="left: 0; top: 0; width: 100%; height: 100%; position: absolute; background-color: white; padding: 12; display: none">
                  <table>
                    <tr>
                      <td><img src="<%=UrlMap.mapImageUrl("loading.gif")%>"></td>
                      <td><b>Loading...</b></td>
                    </tr>                    
                  </table>
                </div>                
              </div> 
            </d:SubWindow>  
          </d:SplitPanel>         
      </d:Pane>      
</d:Layout>
</d:View>
<script language="javascript">
  function contactServiceMan(){
    var s="<%=UrlMap.mapJspUrl("contactServiceMan.jsp")%>";
    window.open(s,"","width=200,height=200,channelmode=yes,menubar=no,location=no,resizable=no,scrollbars=no"); 
  }
</script>

</body>
</html>
